import React from 'react';

interface FormInputProps {
    label: string;
    placeholder: string;
    type?: string;
    value: string;
    onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
}

const FormInput: React.FC<FormInputProps> = ({ label, placeholder, type = 'text', value, onChange }) => {
    return (
        <div className="form-group">
            <label htmlFor={label}>{label}</label>
            <input
                type={type}
                id={label}
                placeholder={placeholder}
                value={value}
                onChange={onChange}
                className="form-input"
            />
        </div>
    );
};

export default FormInput;